package cn.bqjr.eily.shiro.spring.boot.entity;

import cn.bqjr.eily.shiro.spring.boot.entity.Attr.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;

@Component
@EnableConfigurationProperties({BaseAttr.class,
        SessionMgrAttr.class,
        ShiroCookieAttr.class,
        SessionValidationSchedulerAttr.class,
        ShiroRedisAttr.class,
        LoginRetryAttr.class})
public class ShiroProperties {

    @Autowired
    private BaseAttr base;

    @Autowired
    private SessionMgrAttr sessionManager;

    @Autowired
    private ShiroCookieAttr cookie;

    @Autowired
    private SessionValidationSchedulerAttr sessionValidationScheduler;

    @Autowired
    private ShiroRedisAttr redis;

    @Autowired
    private LoginRetryAttr loginRetry;

    public BaseAttr getBase() {
        return base;
    }

    public SessionMgrAttr getSessionManager() {
        return sessionManager;
    }

    public ShiroCookieAttr getCookie() {
        return cookie;
    }

    public SessionValidationSchedulerAttr getSessionValidationScheduler() {
        return sessionValidationScheduler;
    }

    public ShiroRedisAttr getRedis() {
        return redis;
    }

    public LoginRetryAttr getLoginRetry() {
        return loginRetry;
    }
}
